import * as CONSTANTS from "@/constants/index";

export default {
  //存储vuex中的state
  [CONSTANTS.COMMIT_STORAGE_VUEXSTATE]: (state, payload) => {
    window.sessionStorage.setItem(
      CONSTANTS.STORAGE_VUEX_STATE,
      JSON.stringify(state)
    )
  },
  
  [CONSTANTS.COMMIT_UPDATE_COMMONSTATE]: (state, payload) => {
    const { key, value } = payload;
    if (state["common"].hasOwnProperty(key)) state["common"][key] = value;
  },
  
};
